<?php

require('htmlHelpers.php');
require('HtmlGen/lib.htmlgen.php');

h::table( array( "id" => "temperaturedatatable"), function()
{
    h::thread( function()
    {
        h::tr( function()
        {
            h::th( "Date" );
            h::th( "Temperature" );
        } );
    } );

    h::tbody( function()
    {
        $temperatureData = RecentTempertureData();

        foreach( $temperatureData as $pair )
        {
            h::tr( function() use( $pair )
            {
                h::td( "$pair[0]" );
                h::td( "$pair[1]" );
            } );
        }
    } );
} );
?>